package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DimeBasegroupuserMapper;
import com.ruoyi.system.domain.DimeBasegroupuser;
import com.ruoyi.system.service.IDimeBasegroupuserService;

/**
 * 人员所属小组Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-07
 */
@Service
public class DimeBasegroupuserServiceImpl implements IDimeBasegroupuserService 
{
    @Autowired
    private DimeBasegroupuserMapper dimeBasegroupuserMapper;

    /**
     * 查询人员所属小组
     * 
     * @param id 人员所属小组主键
     * @return 人员所属小组
     */
    @Override
    public DimeBasegroupuser selectDimeBasegroupuserById(String id)
    {
        return dimeBasegroupuserMapper.selectDimeBasegroupuserById(id);
    }

    /**
     * 查询人员所属小组列表
     * 
     * @param dimeBasegroupuser 人员所属小组
     * @return 人员所属小组
     */
    @Override
    public List<DimeBasegroupuser> selectDimeBasegroupuserList(DimeBasegroupuser dimeBasegroupuser)
    {
        return dimeBasegroupuserMapper.selectDimeBasegroupuserList(dimeBasegroupuser);
    }

    /**
     * 新增人员所属小组
     * 
     * @param dimeBasegroupuser 人员所属小组
     * @return 结果
     */
    @Override
    public int insertDimeBasegroupuser(DimeBasegroupuser dimeBasegroupuser)
    {
        dimeBasegroupuser.setCreateTime(DateUtils.getNowDate());
        return dimeBasegroupuserMapper.insertDimeBasegroupuser(dimeBasegroupuser);
    }

    /**
     * 修改人员所属小组
     * 
     * @param dimeBasegroupuser 人员所属小组
     * @return 结果
     */
    @Override
    public int updateDimeBasegroupuser(DimeBasegroupuser dimeBasegroupuser)
    {
        dimeBasegroupuser.setUpdateTime(DateUtils.getNowDate());
        return dimeBasegroupuserMapper.updateDimeBasegroupuser(dimeBasegroupuser);
    }

    /**
     * 批量删除人员所属小组
     * 
     * @param ids 需要删除的人员所属小组主键
     * @return 结果
     */
    @Override
    public int deleteDimeBasegroupuserByIds(String[] ids)
    {
        return dimeBasegroupuserMapper.deleteDimeBasegroupuserByIds(ids);
    }

    /**
     * 删除人员所属小组信息
     * 
     * @param id 人员所属小组主键
     * @return 结果
     */
    @Override
    public int deleteDimeBasegroupuserById(String id)
    {
        return dimeBasegroupuserMapper.deleteDimeBasegroupuserById(id);
    }
}
